package cs236703.winter2013.hw4.solution; 

import java.util.Map;
import cs236703.winter2013.hw4.provided.JResult;

public class JTestSummary {
	private int errors,failures,successes;
	public JTestSummary(Map<String,JResult> testMap) {
		for (Map.Entry<String,JResult> entry : testMap.entrySet() ) {
			switch (entry.getValue().getResultType()) {
			case ERROR:
				errors++;
				break;
			case FAILURE:
				failures++;
				break;
			case SUCCESS:
				successes++;
				break;
			default:
				break;
			}
		}
	}
	public int getNumSuccesses() {
		return successes;
	}
	public int getNumFailures() {
		return failures;
	}
	public int getNumErrors() {
		return errors;
	}
} 